package HLLib.base;

import HLCode.HLClass;
import HLCode.HLClassManager;
import HLCode.HLClassManager_H;
import HLCode.HLLibObject;

public class HLLong extends HLLibObject {
    public HLClass GetClass(HLClassManager classManager) {
        return classManager.GetLibClass(HLClassManager_H.CLASS_GROUP_TYPE_LIB_BASE, HLClassManager_H.LIB_CLASS_BASE_Long);
    }

    long value;

    public HLLong() {

    }

    public HLLong(long value) {
        this.value = value;
    }

    public void SetInt(int value) {
        this.value = value;
    }

    public void SetLong(HLLong a) {
        value = a.value;
    }

    public int GetIntLow() {
        return (int) value & 0xffffffff;
    }

    public int GetIntHigh() {
        return (int) (value >> 32) & 0xffffffff;
    }

    public static int Subtract(HLLong a, HLLong b) {
        return (int) (a.value - b.value);
    }

    public static HLLong Parse(HLString s) {
        return new HLLong(Long.parseLong(s.string));
    }
}
